<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/default.xhtml"
	xmlns:bscomp="http://java.sun.com/jsf/composite/components">

	<ui:define name="header">
		<h1>Register <small>An demo page to add sample data</small></h1>
	</ui:define>

	<ui:define name="content">
		<div class="form-horizontal">
			<fieldset>		
				<bscomp:formInputField label="firstname" id="firstName"
					value="#{registerAction.currentRequest.firstName}" />
				<bscomp:formInputField label="lastname" id="lastName"
					value="#{registerAction.currentRequest.lastName}" />
				<bscomp:formInputField label="email" id="email"
					value="#{registerAction.currentRequest.email}" />
				<bscomp:formInputField label="Company name" id="companyName"
					value="#{registerAction.currentRequest.companyName}" />
				<bscomp:formInputField label="comment" id="comment"
					value="#{registerAction.currentRequest.comment}" />
			</fieldset>

			<div class="form-actions">
				<h:commandButton id="registerButton" styleClass="btn btn-primary"
					action="#{registerAction.register}" value="Register" />
				<h:outputText value=" Registered!"
					rendered="#{facesContext.postback and empty facesContext.messageList}"
					style="color: green;" />
			</div>
		</div>

	</ui:define>
	
</ui:composition>
